<?php
function stemming($text, $stem_path, $stem_lang){
  $accent = new COM("ACCENT.Stem");
  // name
  $accent->plain_text = $text;
  $accent->delimiter = " ";
  $accent->Path = $stem_path;
  $accent->lang = $stem_lang;
  $accent->RunStem();
  if ($accent->result_code == 1)
    $stem_text = $accent->subst_text;
  else
    $stem_text = "";
  return $stem_text;          
};
?>